package cn.com.css.taxInspection.statistics.controller;

import io.swagger.annotations.Api;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * 视图
 *
 * @author wenbin
 * @version V1.0
 * @date 2020年3月18日
 */
@Api(tags = "服务端口视图")
@Controller
@RequestMapping("/index/statistics")
public class IndexStatisticsController {

    //检查统计
    @GetMapping("/inspect")
    public String inspect(Model model) {
        return "statistics/inspect";
    }

    //审理统计
    @GetMapping("/hear")
    public String hear(Model model) {
        return "statistics/hear";
    }

    //执行统计
    @GetMapping("/execute")
    public String execute(Model model) {
        return "statistics/execute";
    }

    //入库统计
    @GetMapping("/warehousing")
    public String warehousing(Model model) {
        return "statistics/warehousing";
    }

    //查补统计
    @GetMapping("/checkAndSupplement")
    public String checkAndSupplement(Model model) {
        return "statistics/checkAndSupplement";
    }

    //科室积分
    @GetMapping("/ksjf")
    public String ksjf(Model model) {
        return "statistics/ksjf";
    }

    //送审统计
    @GetMapping("/sstj")
    public String sstj(Model model) {
        return "statistics/sstj";
    }

    //审理统计
    @GetMapping("/sltj")
    public String sltj(Model model) {
        return "statistics/sltj";
    }

    //出两书统计
    @GetMapping("/clstj")
    public String clstj(Model model) {
        return "statistics/clstj";
    }

    @GetMapping("/anjianxiazhuan")
    public ModelAndView anjianxiazhuan(@RequestParam(required = false, value = "swryDm") String swryDm,
                                       @RequestParam(required = false, value = "swjgDm") String swjgDm,
                                       @RequestParam(required = false, value = "ajztDm") String ajztDm
    ) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("statistics/anjianxiazhuan");
        mv.addObject("swryDm", swryDm);
        mv.addObject("swjgDm", swjgDm);
        mv.addObject("ajztDm", ajztDm);
        return mv;
    }

    @GetMapping("/ajlogrecord")
    public ModelAndView ajlogrecord(@RequestParam(required = false, value = "relevance") String relevance) {
        ModelAndView mv = new ModelAndView();
        mv.setViewName("statistics/ajlogrecord");
        mv.addObject("relevance", relevance);
        return mv;
    }

    //稽比析成绩
    @GetMapping("/jbxcj")
    public String jbxcj(Model model) {
        return "statistics/jbxcj";
    }

    //稽比析参数设置
    @GetMapping("/jbxcssz")
    public String jbxcssz(Model model) {
        return "statistics/jbxcssz";
    }
}
